import Vue from 'vue';

import Vuex from 'vuex';

Vue.use(Vuex)

const store = new Vuex.Store({
	state:{
		orderItem:null,
		IMGBOX:null
	},
	mutations:{
		setOrderItem(state,payload){
			state.orderItem = payload
		},
		setIMGBOX(state,payload){
			state.IMGBOX = payload
		}
	},
	actions: {
		//相当于异步的操作,不能直接改变state的值，只能通过触发mutations的方法才能改变
	}
})

export default store